package com.yanqu.road.entity.activity.flowerstudy.data.cross;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.List;
import java.util.Map;

@FieldTypeAnnotation(tableName = "t_c_flower_study_activity_room",desc = "花城书房活动房间数据")
public class CrossFlowerStudyExamRoomData extends DataObject {

    @FieldTypeAnnotation(desc = "活动id",select = true,update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "房间id",select = true,update = true)
    private String roomId;
    @FieldTypeAnnotation(desc = "房间类型")
    private int roomType;
    @FieldTypeAnnotation(desc = "当前状态 0未开始 1进行中 2已结束")
    private int roomState;
    @FieldTypeAnnotation(desc = "玩家数据")
    private Map<Long, CrossFlowerStudyUserBattleData> userBattleDataMap;
    @FieldTypeAnnotation(desc = "问题配置列表")
    private List<Integer> questionList;
    @FieldTypeAnnotation(desc = "当前问题id 0开始 -1结束")
    private int nowQuestionIndex;
    @FieldTypeAnnotation(desc = "匹配结束时间")
    private long matchEndTime;
    @FieldTypeAnnotation(desc = "本题开始时间")
    private long thisQuestionStartTime;
    @FieldTypeAnnotation(desc = "结束时间")
    private long endTime;
    //ai上次动的时间 不入库
    private long aiLastMoveTime;


    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public String getRoomId() {
        return roomId;
    }
    public void setRoomId(String roomId) {
        if (roomId == null){
            return;
        }
        if (this.roomId == null || !this.roomId.equals(roomId)) {
            this.roomId = roomId;
            setOp(DataStatus.Update);
        }
    }

    public int getRoomType() {
        return roomType;
    }
    public void setRoomType(int roomType) {
        if (this.roomType != roomType) {
            this.roomType = roomType;
            setOp(DataStatus.Update);
        }
    }

    public int getRoomState() {
        return roomState;
    }
    public void setRoomState(int roomState) {
        if (this.roomState != roomState) {
            this.roomState = roomState;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Long, com.yanqu.road.entity.activity.flowerstudy.data.cross.CrossFlowerStudyUserBattleData> getUserBattleDataMap() {
        return userBattleDataMap;
    }
    public void setUserBattleDataMap(java.util.Map<java.lang.Long, com.yanqu.road.entity.activity.flowerstudy.data.cross.CrossFlowerStudyUserBattleData> userBattleDataMap) {
        if (null == userBattleDataMap){
            return;
        }
        if (this.userBattleDataMap == null || !this.userBattleDataMap.equals(userBattleDataMap)) {
            this.userBattleDataMap = userBattleDataMap;
            setOp(DataStatus.Update);
        }
    }

    public java.util.List<java.lang.Integer> getQuestionList() {
        return questionList;
    }
    public void setQuestionList(java.util.List<java.lang.Integer> questionList) {
        if (null == questionList){
            return;
        }
        if (this.questionList == null || !this.questionList.equals(questionList)) {
            this.questionList = questionList;
            setOp(DataStatus.Update);
        }
    }

    public int getNowQuestionIndex() {
        return nowQuestionIndex;
    }
    public void setNowQuestionIndex(int nowQuestionIndex) {
        if (this.nowQuestionIndex != nowQuestionIndex) {
            this.nowQuestionIndex = nowQuestionIndex;
            setOp(DataStatus.Update);
        }
    }

    public long getMatchEndTime() {
        return matchEndTime;
    }
    public void setMatchEndTime(long matchEndTime) {
        if (this.matchEndTime != matchEndTime) {
            this.matchEndTime = matchEndTime;
            setOp(DataStatus.Update);
        }
    }

    public long getThisQuestionStartTime() {
        return thisQuestionStartTime;
    }
    public void setThisQuestionStartTime(long thisQuestionStartTime) {
        if (this.thisQuestionStartTime != thisQuestionStartTime) {
            this.thisQuestionStartTime = thisQuestionStartTime;
            setOp(DataStatus.Update);
        }
    }

    public long getEndTime() {
        return endTime;
    }
    public void setEndTime(long endTime) {
        if (this.endTime != endTime) {
            this.endTime = endTime;
            setOp(DataStatus.Update);
        }
    }

    public long getAiLastMoveTime() {
        return aiLastMoveTime;
    }

    public void setAiLastMoveTime(long aiLastMoveTime) {
        this.aiLastMoveTime = aiLastMoveTime;
    }
}
